import fetch from 'common/fetch'
import {topic} from 'common/uri'

export function getTopics(params) {
  return fetch({
    url: topic.topics,
    method: 'get',
    params
  })
}

export function getTotalTopic(params) {
  return fetch({
    url: topic.total,
    method: 'get',
    params
  })
}

export function getCloudData(params) {
  return fetch({
    url: topic.cloud,
    method: 'get',
    params
  })
}

export function getTopicWithArticleById(params) {
  return fetch({
    url: topic.topic,
    method: 'get',
    params
  })
}

export function getTopTenTopic(params) {
  return fetch({
    url: topic.ten,
    method: 'get',
    params
  })
}

export function getTypeData(params) {
  return fetch({
    url: topic.type,
    method: 'get',
    params
  })
}
